%@ Language=VBScript %>
<%
If session("username")="" And session("agentusername")="" Then
ef=True
ec="请您先登陆用户区,再续费。也有可能是超时造成了出错。"
ElseIf Request("id")="" Then
ef=True
ec="请输入产品ID!"
ElseIf Instr(1, Request("id"), "'", 1)>0 then
ef=True
ec="非法产品ID!"
ElseIf not IsNumeric(Request("id")) Then
ef=True
ec="产品ID应该是数字!"
ElseIf Instr(1, session("username"), "'", 1)>0 then
ef=True
ec="非法用户名!"
end if
if not ef then
Set conn=Server.CreateObject("ADODB.Connection")
conn.Open Application("FreeHostDBlink")
username=session("username")
agentname=session("agentname")
AgnRunasUser=session("AgnRunasUser")
If session("agentusername")<>"" Then
agentname=session("agentusername")
username=session("agentusername")
AgnRunasUser=True
End If
if AgnRunasUser=True then
Set dsagent = Server.CreateObject("ADODB.Recordset")
Sql="Select * from FreeHost.FreeHost_Agent where username='"&agentname&"'"
dsagent.Open Sql,conn,1,1
if Not dsagent.eof then
Set dsagnettype = Server.CreateObject("ADODB.Recordset")
Sql="Select * from FreeHost.FreeHost_Agent_pers where agenttype='"&dsagent("agenttype")&"'"
dsagnettype.Open Sql,conn,1,1
if Not dsagnettype.eof Then
canshowagnpric=True
Else
canshowagnpric=false
End if
end If
dsagent.close
end If
Set dsph = Server.CreateObject("ADODB.Recordset")
Sql="Select * from FreeHost.FreeHost_Product_IDC where id='"&Request("id")&"' and username='"&username&"'"
if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then
Response.Write "非法字符!"
Response.End
end if
dsph.Open Sql,conn,1,1
if dsph.Eof then
ef=True
ec="不存在的ID!"
end if
end if
if not ef then
If dsph("status")<>"正常" And Not (dsph("endtime")>now and dsph("status")="关机") Then
ef=True
ec="处于正常状态的产品才能延期!"
end if
End If
if not ef then
Set dsHostpdlist = Server.CreateObject("ADODB.Recordset")
Sql="Select * from FreeHost.FreeHost_IDCProductlist where IDCtype='"&dsph("IDCtype")&"'"
if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then
Response.Write "非法字符!"
Response.End
end if
dsHostpdlist.Open Sql,conn,1,1
if dsHostpdlist.Eof then
ef=True
ec="产品不存在!"
Else
'读取月付
PAY_Month=dsHostpdlist("PAY_Month")
PAY_Season=dsHostpdlist("PAY_Season")
PAY_halfyear=dsHostpdlist("PAY_halfyear")
PAY_Nextyear=dsHostpdlist("PAY_Nextyear")
if dsph("istest")="y" then PAY_Nextyear=1
PAY_2year=dsHostpdlist("PAY_2year")
PAY_3year=dsHostpdlist("PAY_3year")
PAY_4year=dsHostpdlist("PAY_4year")
PAY_5year=dsHostpdlist("PAY_5year")
end if
end if
if not ef then
if session("agentusername")<>"" Then%>
<%session("FreeHostCom").FreeHost_WR("html5")%>
<%else%>
<%End if%>
托管/租用类延期
<%if session("agentusername")<>"" Then%>
<%session("FreeHostCom").FreeHost_WR("html6")%>
<%else%>
<%End if%>